package cn.wu.org.domain;

import lombok.Data;
//部门类
@Data
public class Department {
    //主键
    private Long id;
    //部门编号
    private String sn;
    //部门名称
    private String name;
    //部门路径
    private String dirPath;
    //部门状态
    private Integer state;
    //部门经理id
    private Long managerId;
    //上级id
    private Long parentId;

    //部门经理
    private Employee manager;

    // 上级部门
    private Department parent;

    @Override
    public String toString() {
        return "Department{" +
                "id=" + id +
                ", sn='" + sn + '\'' +
                ", name='" + name + '\'' +
                ", dirPath='" + dirPath + '\'' +
                ", state=" + state +
                ", managerId=" + managerId +
                ", parentId=" + parentId +
                '}';
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getSn() {
        return sn;
    }

    public void setSn(String sn) {
        this.sn = sn;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDirPath() {
        return dirPath;
    }

    public void setDirPath(String dirPath) {
        this.dirPath = dirPath;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Long getManagerId() {
        return managerId;
    }

    public void setManagerId(Long managerId) {
        this.managerId = managerId;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public Department() {
    }

    public Department(Long id, String sn, String name, String dirPath, Integer state, Long managerId, Long parentId) {
        this.id = id;
        this.sn = sn;
        this.name = name;
        this.dirPath = dirPath;
        this.state = state;
        this.managerId = managerId;
        this.parentId = parentId;
    }
}
